package com.jinly.ryder.flow.service.model;

import com.jinly.ryder.common.auth.model.AuthRole;
import com.jinly.ryder.common.auth.model.AuthType;
import lombok.Data;

import java.util.List;
import java.util.Map;


/**
 * 流程步骤
 */
@Data
public class FlowStep {

    /**
     * 步骤名称
     */
    private String name;

    private Boolean needInvoke;

    /**
     * 审批人条件
     */
    private AuditCondition auditCondition;

    /**
     * 下一步条件
     */
    private Map<String, String> nextStepMap;

    /**
     * 审批人条件
     */
    @Data
    public static class AuditCondition {
        private List<AuditUserCondition> userConditionList;
    }

    /**
     * 审批人条件
     */
    @Data
    public static class AuditUserCondition {
        /**
         * 权限类型
         */
        private AuthType authType;

        /**
         * 权限角色
         */
        private AuthRole authRole;
    }

}
